// $ANTLR 3.4 /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g 2013-10-23 13:22:58

import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

import org.antlr.runtime.debug.*;
import java.io.IOException;
@SuppressWarnings({"all", "warnings", "unchecked"})
public class MiniPnParser extends DebugParser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "BOOL", "COMMENT", "DECLARATION", "ID", "LINEOP", "NUMBER", "PCLOSED", "POINTOP", "POPEN", "RELOP", "SEMI", "STRING", "','", "'.'", "'begin'", "'boolean'", "'do'", "'else'", "'end'", "'fi'", "'if'", "'integer'", "'od'", "'println'", "'program'", "'read'", "'real'", "'string'", "'then'", "'while'"
    };

    public static final int EOF=-1;
    public static final int T__16=16;
    public static final int T__17=17;
    public static final int T__18=18;
    public static final int T__19=19;
    public static final int T__20=20;
    public static final int T__21=21;
    public static final int T__22=22;
    public static final int T__23=23;
    public static final int T__24=24;
    public static final int T__25=25;
    public static final int T__26=26;
    public static final int T__27=27;
    public static final int T__28=28;
    public static final int T__29=29;
    public static final int T__30=30;
    public static final int T__31=31;
    public static final int T__32=32;
    public static final int T__33=33;
    public static final int BOOL=4;
    public static final int COMMENT=5;
    public static final int DECLARATION=6;
    public static final int ID=7;
    public static final int LINEOP=8;
    public static final int NUMBER=9;
    public static final int PCLOSED=10;
    public static final int POINTOP=11;
    public static final int POPEN=12;
    public static final int RELOP=13;
    public static final int SEMI=14;
    public static final int STRING=15;

    // delegates
    public Parser[] getDelegates() {
        return new Parser[] {};
    }

    // delegators


public static final String[] ruleNames = new String[] {
    "invalidRule", "statement", "readStat", "constant", "realConst", "comparison", 
    "pointExpr", "atom", "printStat", "ifStat", "whileStat", "declaration", 
    "stringConst", "assignment", "prog", "intConst", "arithExpr"
};

public static final boolean[] decisionCanBacktrack = new boolean[] {
    false, // invalid decision
    false, false, false, false, false, false, false, false, false, false, 
        false, false, false, false, false, false, false, false, false
};

 
    public int ruleLevel = 0;
    public int getRuleLevel() { return ruleLevel; }
    public void incRuleLevel() { ruleLevel++; }
    public void decRuleLevel() { ruleLevel--; }
    public MiniPnParser(TokenStream input) {
        this(input, DebugEventSocketProxy.DEFAULT_DEBUGGER_PORT, new RecognizerSharedState());
    }
    public MiniPnParser(TokenStream input, int port, RecognizerSharedState state) {
        super(input, state);
        DebugEventSocketProxy proxy =
            new DebugEventSocketProxy(this, port, null);

        setDebugListener(proxy);
        try {
            proxy.handshake();
        }
        catch (IOException ioe) {
            reportError(ioe);
        }
    }

public MiniPnParser(TokenStream input, DebugEventListener dbg) {
    super(input, dbg, new RecognizerSharedState());
}

protected boolean evalPredicate(boolean result, String predicate) {
    dbg.semanticPredicate(result, predicate);
    return result;
}

    public String[] getTokenNames() { return MiniPnParser.tokenNames; }
    public String getGrammarFileName() { return "/Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g"; }



    // $ANTLR start "prog"
    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:4:1: prog : 'program' ( declaration )* 'begin' ( statement )* 'end' ;
    public final void prog() throws RecognitionException {
        try { dbg.enterRule(getGrammarFileName(), "prog");
        if ( getRuleLevel()==0 ) {dbg.commence();}
        incRuleLevel();
        dbg.location(4, 0);

        try {
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:4:7: ( 'program' ( declaration )* 'begin' ( statement )* 'end' )
            dbg.enterAlt(1);

            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:4:9: 'program' ( declaration )* 'begin' ( statement )* 'end'
            {
            dbg.location(4,9);
            match(input,28,FOLLOW_28_in_prog12); 
            dbg.location(4,19);
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:4:19: ( declaration )*
            try { dbg.enterSubRule(1);

            loop1:
            do {
                int alt1=2;
                try { dbg.enterDecision(1, decisionCanBacktrack[1]);

                int LA1_0 = input.LA(1);

                if ( (LA1_0==19||LA1_0==25||(LA1_0 >= 30 && LA1_0 <= 31)) ) {
                    alt1=1;
                }


                } finally {dbg.exitDecision(1);}

                switch (alt1) {
            	case 1 :
            	    dbg.enterAlt(1);

            	    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:4:19: declaration
            	    {
            	    dbg.location(4,19);
            	    pushFollow(FOLLOW_declaration_in_prog14);
            	    declaration();

            	    state._fsp--;


            	    }
            	    break;

            	default :
            	    break loop1;
                }
            } while (true);
            } finally {dbg.exitSubRule(1);}

            dbg.location(4,32);
            match(input,18,FOLLOW_18_in_prog17); 
            dbg.location(4,40);
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:4:40: ( statement )*
            try { dbg.enterSubRule(2);

            loop2:
            do {
                int alt2=2;
                try { dbg.enterDecision(2, decisionCanBacktrack[2]);

                int LA2_0 = input.LA(1);

                if ( (LA2_0==ID||LA2_0==24||LA2_0==27||LA2_0==29||LA2_0==33) ) {
                    alt2=1;
                }


                } finally {dbg.exitDecision(2);}

                switch (alt2) {
            	case 1 :
            	    dbg.enterAlt(1);

            	    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:4:40: statement
            	    {
            	    dbg.location(4,40);
            	    pushFollow(FOLLOW_statement_in_prog19);
            	    statement();

            	    state._fsp--;


            	    }
            	    break;

            	default :
            	    break loop2;
                }
            } while (true);
            } finally {dbg.exitSubRule(2);}

            dbg.location(4,51);
            match(input,22,FOLLOW_22_in_prog22); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        dbg.location(4, 56);

        }
        finally {
            dbg.exitRule(getGrammarFileName(), "prog");
            decRuleLevel();
            if ( getRuleLevel()==0 ) {dbg.terminate();}
        }

        return ;
    }
    // $ANTLR end "prog"



    // $ANTLR start "declaration"
    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:6:1: declaration : ( 'integer' | 'real' | 'string' | 'boolean' ) ID ( ',' ID )* SEMI ;
    public final void declaration() throws RecognitionException {
        try { dbg.enterRule(getGrammarFileName(), "declaration");
        if ( getRuleLevel()==0 ) {dbg.commence();}
        incRuleLevel();
        dbg.location(6, 0);

        try {
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:6:12: ( ( 'integer' | 'real' | 'string' | 'boolean' ) ID ( ',' ID )* SEMI )
            dbg.enterAlt(1);

            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:6:14: ( 'integer' | 'real' | 'string' | 'boolean' ) ID ( ',' ID )* SEMI
            {
            dbg.location(6,14);
            if ( input.LA(1)==19||input.LA(1)==25||(input.LA(1) >= 30 && input.LA(1) <= 31) ) {
                input.consume();
                state.errorRecovery=false;
            }
            else {
                MismatchedSetException mse = new MismatchedSetException(null,input);
                dbg.recognitionException(mse);
                throw mse;
            }

            dbg.location(6,52);
            match(input,ID,FOLLOW_ID_in_declaration40); 
            dbg.location(6,54);
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:6:54: ( ',' ID )*
            try { dbg.enterSubRule(3);

            loop3:
            do {
                int alt3=2;
                try { dbg.enterDecision(3, decisionCanBacktrack[3]);

                int LA3_0 = input.LA(1);

                if ( (LA3_0==16) ) {
                    alt3=1;
                }


                } finally {dbg.exitDecision(3);}

                switch (alt3) {
            	case 1 :
            	    dbg.enterAlt(1);

            	    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:6:55: ',' ID
            	    {
            	    dbg.location(6,55);
            	    match(input,16,FOLLOW_16_in_declaration42); 
            	    dbg.location(6,58);
            	    match(input,ID,FOLLOW_ID_in_declaration43); 

            	    }
            	    break;

            	default :
            	    break loop3;
                }
            } while (true);
            } finally {dbg.exitSubRule(3);}

            dbg.location(6,63);
            match(input,SEMI,FOLLOW_SEMI_in_declaration47); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        dbg.location(6, 66);

        }
        finally {
            dbg.exitRule(getGrammarFileName(), "declaration");
            decRuleLevel();
            if ( getRuleLevel()==0 ) {dbg.terminate();}
        }

        return ;
    }
    // $ANTLR end "declaration"



    // $ANTLR start "statement"
    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:8:1: statement : ( assignment | ifStat | whileStat | readStat | printStat );
    public final void statement() throws RecognitionException {
        try { dbg.enterRule(getGrammarFileName(), "statement");
        if ( getRuleLevel()==0 ) {dbg.commence();}
        incRuleLevel();
        dbg.location(8, 0);

        try {
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:8:10: ( assignment | ifStat | whileStat | readStat | printStat )
            int alt4=5;
            try { dbg.enterDecision(4, decisionCanBacktrack[4]);

            switch ( input.LA(1) ) {
            case ID:
                {
                alt4=1;
                }
                break;
            case 24:
                {
                alt4=2;
                }
                break;
            case 33:
                {
                alt4=3;
                }
                break;
            case 29:
                {
                alt4=4;
                }
                break;
            case 27:
                {
                alt4=5;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 4, 0, input);

                dbg.recognitionException(nvae);
                throw nvae;

            }

            } finally {dbg.exitDecision(4);}

            switch (alt4) {
                case 1 :
                    dbg.enterAlt(1);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:8:12: assignment
                    {
                    dbg.location(8,12);
                    pushFollow(FOLLOW_assignment_in_statement54);
                    assignment();

                    state._fsp--;


                    }
                    break;
                case 2 :
                    dbg.enterAlt(2);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:9:5: ifStat
                    {
                    dbg.location(9,5);
                    pushFollow(FOLLOW_ifStat_in_statement60);
                    ifStat();

                    state._fsp--;


                    }
                    break;
                case 3 :
                    dbg.enterAlt(3);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:10:12: whileStat
                    {
                    dbg.location(10,12);
                    pushFollow(FOLLOW_whileStat_in_statement73);
                    whileStat();

                    state._fsp--;


                    }
                    break;
                case 4 :
                    dbg.enterAlt(4);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:11:6: readStat
                    {
                    dbg.location(11,6);
                    pushFollow(FOLLOW_readStat_in_statement80);
                    readStat();

                    state._fsp--;


                    }
                    break;
                case 5 :
                    dbg.enterAlt(5);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:12:5: printStat
                    {
                    dbg.location(12,5);
                    pushFollow(FOLLOW_printStat_in_statement86);
                    printStat();

                    state._fsp--;


                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        dbg.location(13, 2);

        }
        finally {
            dbg.exitRule(getGrammarFileName(), "statement");
            decRuleLevel();
            if ( getRuleLevel()==0 ) {dbg.terminate();}
        }

        return ;
    }
    // $ANTLR end "statement"



    // $ANTLR start "assignment"
    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:16:1: assignment : ID DECLARATION ( arithExpr | stringConst | comparison ) ;
    public final void assignment() throws RecognitionException {
        try { dbg.enterRule(getGrammarFileName(), "assignment");
        if ( getRuleLevel()==0 ) {dbg.commence();}
        incRuleLevel();
        dbg.location(16, 0);

        try {
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:16:11: ( ID DECLARATION ( arithExpr | stringConst | comparison ) )
            dbg.enterAlt(1);

            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:16:13: ID DECLARATION ( arithExpr | stringConst | comparison )
            {
            dbg.location(16,13);
            match(input,ID,FOLLOW_ID_in_assignment97); 
            dbg.location(16,16);
            match(input,DECLARATION,FOLLOW_DECLARATION_in_assignment99); 
            dbg.location(16,28);
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:16:28: ( arithExpr | stringConst | comparison )
            int alt5=3;
            try { dbg.enterSubRule(5);
            try { dbg.enterDecision(5, decisionCanBacktrack[5]);

            try {
                isCyclicDecision = true;
                alt5 = dfa5.predict(input);
            }
            catch (NoViableAltException nvae) {
                dbg.recognitionException(nvae);
                throw nvae;
            }
            } finally {dbg.exitDecision(5);}

            switch (alt5) {
                case 1 :
                    dbg.enterAlt(1);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:16:29: arithExpr
                    {
                    dbg.location(16,29);
                    pushFollow(FOLLOW_arithExpr_in_assignment102);
                    arithExpr();

                    state._fsp--;


                    }
                    break;
                case 2 :
                    dbg.enterAlt(2);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:16:39: stringConst
                    {
                    dbg.location(16,39);
                    pushFollow(FOLLOW_stringConst_in_assignment104);
                    stringConst();

                    state._fsp--;


                    }
                    break;
                case 3 :
                    dbg.enterAlt(3);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:16:51: comparison
                    {
                    dbg.location(16,51);
                    pushFollow(FOLLOW_comparison_in_assignment106);
                    comparison();

                    state._fsp--;


                    }
                    break;

            }
            } finally {dbg.exitSubRule(5);}


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        dbg.location(16, 61);

        }
        finally {
            dbg.exitRule(getGrammarFileName(), "assignment");
            decRuleLevel();
            if ( getRuleLevel()==0 ) {dbg.terminate();}
        }

        return ;
    }
    // $ANTLR end "assignment"



    // $ANTLR start "arithExpr"
    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:18:1: arithExpr : pointExpr ( LINEOP pointExpr )* ;
    public final void arithExpr() throws RecognitionException {
        try { dbg.enterRule(getGrammarFileName(), "arithExpr");
        if ( getRuleLevel()==0 ) {dbg.commence();}
        incRuleLevel();
        dbg.location(18, 0);

        try {
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:18:10: ( pointExpr ( LINEOP pointExpr )* )
            dbg.enterAlt(1);

            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:18:13: pointExpr ( LINEOP pointExpr )*
            {
            dbg.location(18,13);
            pushFollow(FOLLOW_pointExpr_in_arithExpr115);
            pointExpr();

            state._fsp--;

            dbg.location(18,23);
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:18:23: ( LINEOP pointExpr )*
            try { dbg.enterSubRule(6);

            loop6:
            do {
                int alt6=2;
                try { dbg.enterDecision(6, decisionCanBacktrack[6]);

                int LA6_0 = input.LA(1);

                if ( (LA6_0==LINEOP) ) {
                    alt6=1;
                }


                } finally {dbg.exitDecision(6);}

                switch (alt6) {
            	case 1 :
            	    dbg.enterAlt(1);

            	    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:18:24: LINEOP pointExpr
            	    {
            	    dbg.location(18,24);
            	    match(input,LINEOP,FOLLOW_LINEOP_in_arithExpr118); 
            	    dbg.location(18,31);
            	    pushFollow(FOLLOW_pointExpr_in_arithExpr120);
            	    pointExpr();

            	    state._fsp--;


            	    }
            	    break;

            	default :
            	    break loop6;
                }
            } while (true);
            } finally {dbg.exitSubRule(6);}


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        dbg.location(18, 43);

        }
        finally {
            dbg.exitRule(getGrammarFileName(), "arithExpr");
            decRuleLevel();
            if ( getRuleLevel()==0 ) {dbg.terminate();}
        }

        return ;
    }
    // $ANTLR end "arithExpr"



    // $ANTLR start "pointExpr"
    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:20:1: pointExpr : atom ( POINTOP atom )* ;
    public final void pointExpr() throws RecognitionException {
        try { dbg.enterRule(getGrammarFileName(), "pointExpr");
        if ( getRuleLevel()==0 ) {dbg.commence();}
        incRuleLevel();
        dbg.location(20, 0);

        try {
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:20:10: ( atom ( POINTOP atom )* )
            dbg.enterAlt(1);

            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:20:13: atom ( POINTOP atom )*
            {
            dbg.location(20,13);
            pushFollow(FOLLOW_atom_in_pointExpr132);
            atom();

            state._fsp--;

            dbg.location(20,18);
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:20:18: ( POINTOP atom )*
            try { dbg.enterSubRule(7);

            loop7:
            do {
                int alt7=2;
                try { dbg.enterDecision(7, decisionCanBacktrack[7]);

                int LA7_0 = input.LA(1);

                if ( (LA7_0==POINTOP) ) {
                    alt7=1;
                }


                } finally {dbg.exitDecision(7);}

                switch (alt7) {
            	case 1 :
            	    dbg.enterAlt(1);

            	    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:20:19: POINTOP atom
            	    {
            	    dbg.location(20,19);
            	    match(input,POINTOP,FOLLOW_POINTOP_in_pointExpr135); 
            	    dbg.location(20,27);
            	    pushFollow(FOLLOW_atom_in_pointExpr137);
            	    atom();

            	    state._fsp--;


            	    }
            	    break;

            	default :
            	    break loop7;
                }
            } while (true);
            } finally {dbg.exitSubRule(7);}


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        dbg.location(20, 33);

        }
        finally {
            dbg.exitRule(getGrammarFileName(), "pointExpr");
            decRuleLevel();
            if ( getRuleLevel()==0 ) {dbg.terminate();}
        }

        return ;
    }
    // $ANTLR end "pointExpr"



    // $ANTLR start "atom"
    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:22:1: atom : ( intConst | ID | ( POPEN arithExpr PCLOSED ) );
    public final void atom() throws RecognitionException {
        try { dbg.enterRule(getGrammarFileName(), "atom");
        if ( getRuleLevel()==0 ) {dbg.commence();}
        incRuleLevel();
        dbg.location(22, 0);

        try {
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:22:6: ( intConst | ID | ( POPEN arithExpr PCLOSED ) )
            int alt8=3;
            try { dbg.enterDecision(8, decisionCanBacktrack[8]);

            switch ( input.LA(1) ) {
            case NUMBER:
                {
                alt8=1;
                }
                break;
            case ID:
                {
                alt8=2;
                }
                break;
            case POPEN:
                {
                alt8=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("", 8, 0, input);

                dbg.recognitionException(nvae);
                throw nvae;

            }

            } finally {dbg.exitDecision(8);}

            switch (alt8) {
                case 1 :
                    dbg.enterAlt(1);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:22:8: intConst
                    {
                    dbg.location(22,8);
                    pushFollow(FOLLOW_intConst_in_atom148);
                    intConst();

                    state._fsp--;


                    }
                    break;
                case 2 :
                    dbg.enterAlt(2);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:23:4: ID
                    {
                    dbg.location(23,4);
                    match(input,ID,FOLLOW_ID_in_atom153); 

                    }
                    break;
                case 3 :
                    dbg.enterAlt(3);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:24:5: ( POPEN arithExpr PCLOSED )
                    {
                    dbg.location(24,5);
                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:24:5: ( POPEN arithExpr PCLOSED )
                    dbg.enterAlt(1);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:24:6: POPEN arithExpr PCLOSED
                    {
                    dbg.location(24,6);
                    match(input,POPEN,FOLLOW_POPEN_in_atom161); 
                    dbg.location(24,12);
                    pushFollow(FOLLOW_arithExpr_in_atom163);
                    arithExpr();

                    state._fsp--;

                    dbg.location(24,22);
                    match(input,PCLOSED,FOLLOW_PCLOSED_in_atom165); 

                    }


                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        dbg.location(25, 1);

        }
        finally {
            dbg.exitRule(getGrammarFileName(), "atom");
            decRuleLevel();
            if ( getRuleLevel()==0 ) {dbg.terminate();}
        }

        return ;
    }
    // $ANTLR end "atom"



    // $ANTLR start "comparison"
    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:29:1: comparison : ( ID | constant ) RELOP ( ID | constant ) ;
    public final void comparison() throws RecognitionException {
        try { dbg.enterRule(getGrammarFileName(), "comparison");
        if ( getRuleLevel()==0 ) {dbg.commence();}
        incRuleLevel();
        dbg.location(29, 0);

        try {
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:29:11: ( ( ID | constant ) RELOP ( ID | constant ) )
            dbg.enterAlt(1);

            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:29:13: ( ID | constant ) RELOP ( ID | constant )
            {
            dbg.location(29,13);
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:29:13: ( ID | constant )
            int alt9=2;
            try { dbg.enterSubRule(9);
            try { dbg.enterDecision(9, decisionCanBacktrack[9]);

            int LA9_0 = input.LA(1);

            if ( (LA9_0==ID) ) {
                alt9=1;
            }
            else if ( (LA9_0==BOOL||LA9_0==NUMBER||LA9_0==STRING) ) {
                alt9=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 9, 0, input);

                dbg.recognitionException(nvae);
                throw nvae;

            }
            } finally {dbg.exitDecision(9);}

            switch (alt9) {
                case 1 :
                    dbg.enterAlt(1);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:29:14: ID
                    {
                    dbg.location(29,14);
                    match(input,ID,FOLLOW_ID_in_comparison179); 

                    }
                    break;
                case 2 :
                    dbg.enterAlt(2);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:29:17: constant
                    {
                    dbg.location(29,17);
                    pushFollow(FOLLOW_constant_in_comparison181);
                    constant();

                    state._fsp--;


                    }
                    break;

            }
            } finally {dbg.exitSubRule(9);}

            dbg.location(29,27);
            match(input,RELOP,FOLLOW_RELOP_in_comparison184); 
            dbg.location(29,33);
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:29:33: ( ID | constant )
            int alt10=2;
            try { dbg.enterSubRule(10);
            try { dbg.enterDecision(10, decisionCanBacktrack[10]);

            int LA10_0 = input.LA(1);

            if ( (LA10_0==ID) ) {
                alt10=1;
            }
            else if ( (LA10_0==BOOL||LA10_0==NUMBER||LA10_0==STRING) ) {
                alt10=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 10, 0, input);

                dbg.recognitionException(nvae);
                throw nvae;

            }
            } finally {dbg.exitDecision(10);}

            switch (alt10) {
                case 1 :
                    dbg.enterAlt(1);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:29:34: ID
                    {
                    dbg.location(29,34);
                    match(input,ID,FOLLOW_ID_in_comparison187); 

                    }
                    break;
                case 2 :
                    dbg.enterAlt(2);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:29:37: constant
                    {
                    dbg.location(29,37);
                    pushFollow(FOLLOW_constant_in_comparison189);
                    constant();

                    state._fsp--;


                    }
                    break;

            }
            } finally {dbg.exitSubRule(10);}


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        dbg.location(29, 46);

        }
        finally {
            dbg.exitRule(getGrammarFileName(), "comparison");
            decRuleLevel();
            if ( getRuleLevel()==0 ) {dbg.terminate();}
        }

        return ;
    }
    // $ANTLR end "comparison"



    // $ANTLR start "ifStat"
    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:31:1: ifStat : 'if' comparison 'then' ( statement )+ ( 'else' ( statement )+ )? 'fi' ;
    public final void ifStat() throws RecognitionException {
        try { dbg.enterRule(getGrammarFileName(), "ifStat");
        if ( getRuleLevel()==0 ) {dbg.commence();}
        incRuleLevel();
        dbg.location(31, 0);

        try {
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:31:8: ( 'if' comparison 'then' ( statement )+ ( 'else' ( statement )+ )? 'fi' )
            dbg.enterAlt(1);

            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:31:10: 'if' comparison 'then' ( statement )+ ( 'else' ( statement )+ )? 'fi'
            {
            dbg.location(31,10);
            match(input,24,FOLLOW_24_in_ifStat199); 
            dbg.location(31,15);
            pushFollow(FOLLOW_comparison_in_ifStat201);
            comparison();

            state._fsp--;

            dbg.location(31,26);
            match(input,32,FOLLOW_32_in_ifStat203); 
            dbg.location(31,33);
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:31:33: ( statement )+
            int cnt11=0;
            try { dbg.enterSubRule(11);

            loop11:
            do {
                int alt11=2;
                try { dbg.enterDecision(11, decisionCanBacktrack[11]);

                int LA11_0 = input.LA(1);

                if ( (LA11_0==ID||LA11_0==24||LA11_0==27||LA11_0==29||LA11_0==33) ) {
                    alt11=1;
                }


                } finally {dbg.exitDecision(11);}

                switch (alt11) {
            	case 1 :
            	    dbg.enterAlt(1);

            	    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:31:33: statement
            	    {
            	    dbg.location(31,33);
            	    pushFollow(FOLLOW_statement_in_ifStat205);
            	    statement();

            	    state._fsp--;


            	    }
            	    break;

            	default :
            	    if ( cnt11 >= 1 ) break loop11;
                        EarlyExitException eee =
                            new EarlyExitException(11, input);
                        dbg.recognitionException(eee);

                        throw eee;
                }
                cnt11++;
            } while (true);
            } finally {dbg.exitSubRule(11);}

            dbg.location(31,44);
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:31:44: ( 'else' ( statement )+ )?
            int alt13=2;
            try { dbg.enterSubRule(13);
            try { dbg.enterDecision(13, decisionCanBacktrack[13]);

            int LA13_0 = input.LA(1);

            if ( (LA13_0==21) ) {
                alt13=1;
            }
            } finally {dbg.exitDecision(13);}

            switch (alt13) {
                case 1 :
                    dbg.enterAlt(1);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:31:45: 'else' ( statement )+
                    {
                    dbg.location(31,45);
                    match(input,21,FOLLOW_21_in_ifStat209); 
                    dbg.location(31,52);
                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:31:52: ( statement )+
                    int cnt12=0;
                    try { dbg.enterSubRule(12);

                    loop12:
                    do {
                        int alt12=2;
                        try { dbg.enterDecision(12, decisionCanBacktrack[12]);

                        int LA12_0 = input.LA(1);

                        if ( (LA12_0==ID||LA12_0==24||LA12_0==27||LA12_0==29||LA12_0==33) ) {
                            alt12=1;
                        }


                        } finally {dbg.exitDecision(12);}

                        switch (alt12) {
                    	case 1 :
                    	    dbg.enterAlt(1);

                    	    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:31:52: statement
                    	    {
                    	    dbg.location(31,52);
                    	    pushFollow(FOLLOW_statement_in_ifStat211);
                    	    statement();

                    	    state._fsp--;


                    	    }
                    	    break;

                    	default :
                    	    if ( cnt12 >= 1 ) break loop12;
                                EarlyExitException eee =
                                    new EarlyExitException(12, input);
                                dbg.recognitionException(eee);

                                throw eee;
                        }
                        cnt12++;
                    } while (true);
                    } finally {dbg.exitSubRule(12);}


                    }
                    break;

            }
            } finally {dbg.exitSubRule(13);}

            dbg.location(31,65);
            match(input,23,FOLLOW_23_in_ifStat216); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        dbg.location(31, 68);

        }
        finally {
            dbg.exitRule(getGrammarFileName(), "ifStat");
            decRuleLevel();
            if ( getRuleLevel()==0 ) {dbg.terminate();}
        }

        return ;
    }
    // $ANTLR end "ifStat"



    // $ANTLR start "whileStat"
    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:33:1: whileStat : 'while' comparison 'do' ( statement )* 'od' ;
    public final void whileStat() throws RecognitionException {
        try { dbg.enterRule(getGrammarFileName(), "whileStat");
        if ( getRuleLevel()==0 ) {dbg.commence();}
        incRuleLevel();
        dbg.location(33, 0);

        try {
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:33:11: ( 'while' comparison 'do' ( statement )* 'od' )
            dbg.enterAlt(1);

            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:33:12: 'while' comparison 'do' ( statement )* 'od'
            {
            dbg.location(33,12);
            match(input,33,FOLLOW_33_in_whileStat223); 
            dbg.location(33,20);
            pushFollow(FOLLOW_comparison_in_whileStat225);
            comparison();

            state._fsp--;

            dbg.location(33,31);
            match(input,20,FOLLOW_20_in_whileStat227); 
            dbg.location(33,36);
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:33:36: ( statement )*
            try { dbg.enterSubRule(14);

            loop14:
            do {
                int alt14=2;
                try { dbg.enterDecision(14, decisionCanBacktrack[14]);

                int LA14_0 = input.LA(1);

                if ( (LA14_0==ID||LA14_0==24||LA14_0==27||LA14_0==29||LA14_0==33) ) {
                    alt14=1;
                }


                } finally {dbg.exitDecision(14);}

                switch (alt14) {
            	case 1 :
            	    dbg.enterAlt(1);

            	    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:33:36: statement
            	    {
            	    dbg.location(33,36);
            	    pushFollow(FOLLOW_statement_in_whileStat229);
            	    statement();

            	    state._fsp--;


            	    }
            	    break;

            	default :
            	    break loop14;
                }
            } while (true);
            } finally {dbg.exitSubRule(14);}

            dbg.location(33,47);
            match(input,26,FOLLOW_26_in_whileStat232); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        dbg.location(33, 50);

        }
        finally {
            dbg.exitRule(getGrammarFileName(), "whileStat");
            decRuleLevel();
            if ( getRuleLevel()==0 ) {dbg.terminate();}
        }

        return ;
    }
    // $ANTLR end "whileStat"



    // $ANTLR start "readStat"
    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:35:1: readStat : 'read' POPEN ID PCLOSED ;
    public final void readStat() throws RecognitionException {
        try { dbg.enterRule(getGrammarFileName(), "readStat");
        if ( getRuleLevel()==0 ) {dbg.commence();}
        incRuleLevel();
        dbg.location(35, 0);

        try {
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:35:10: ( 'read' POPEN ID PCLOSED )
            dbg.enterAlt(1);

            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:35:12: 'read' POPEN ID PCLOSED
            {
            dbg.location(35,12);
            match(input,29,FOLLOW_29_in_readStat240); 
            dbg.location(35,20);
            match(input,POPEN,FOLLOW_POPEN_in_readStat243); 
            dbg.location(35,26);
            match(input,ID,FOLLOW_ID_in_readStat245); 
            dbg.location(35,29);
            match(input,PCLOSED,FOLLOW_PCLOSED_in_readStat247); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        dbg.location(35, 35);

        }
        finally {
            dbg.exitRule(getGrammarFileName(), "readStat");
            decRuleLevel();
            if ( getRuleLevel()==0 ) {dbg.terminate();}
        }

        return ;
    }
    // $ANTLR end "readStat"



    // $ANTLR start "printStat"
    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:37:1: printStat : 'println' POPEN ( ID | stringConst ) PCLOSED ;
    public final void printStat() throws RecognitionException {
        try { dbg.enterRule(getGrammarFileName(), "printStat");
        if ( getRuleLevel()==0 ) {dbg.commence();}
        incRuleLevel();
        dbg.location(37, 0);

        try {
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:37:11: ( 'println' POPEN ( ID | stringConst ) PCLOSED )
            dbg.enterAlt(1);

            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:37:13: 'println' POPEN ( ID | stringConst ) PCLOSED
            {
            dbg.location(37,13);
            match(input,27,FOLLOW_27_in_printStat255); 
            dbg.location(37,23);
            match(input,POPEN,FOLLOW_POPEN_in_printStat257); 
            dbg.location(37,29);
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:37:29: ( ID | stringConst )
            int alt15=2;
            try { dbg.enterSubRule(15);
            try { dbg.enterDecision(15, decisionCanBacktrack[15]);

            int LA15_0 = input.LA(1);

            if ( (LA15_0==ID) ) {
                alt15=1;
            }
            else if ( (LA15_0==STRING) ) {
                alt15=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("", 15, 0, input);

                dbg.recognitionException(nvae);
                throw nvae;

            }
            } finally {dbg.exitDecision(15);}

            switch (alt15) {
                case 1 :
                    dbg.enterAlt(1);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:37:30: ID
                    {
                    dbg.location(37,30);
                    match(input,ID,FOLLOW_ID_in_printStat260); 

                    }
                    break;
                case 2 :
                    dbg.enterAlt(2);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:37:33: stringConst
                    {
                    dbg.location(37,33);
                    pushFollow(FOLLOW_stringConst_in_printStat262);
                    stringConst();

                    state._fsp--;


                    }
                    break;

            }
            } finally {dbg.exitSubRule(15);}

            dbg.location(37,46);
            match(input,PCLOSED,FOLLOW_PCLOSED_in_printStat265); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        dbg.location(37, 53);

        }
        finally {
            dbg.exitRule(getGrammarFileName(), "printStat");
            decRuleLevel();
            if ( getRuleLevel()==0 ) {dbg.terminate();}
        }

        return ;
    }
    // $ANTLR end "printStat"



    // $ANTLR start "intConst"
    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:49:1: intConst : ( NUMBER )+ ;
    public final void intConst() throws RecognitionException {
        try { dbg.enterRule(getGrammarFileName(), "intConst");
        if ( getRuleLevel()==0 ) {dbg.commence();}
        incRuleLevel();
        dbg.location(49, 0);

        try {
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:49:10: ( ( NUMBER )+ )
            dbg.enterAlt(1);

            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:49:11: ( NUMBER )+
            {
            dbg.location(49,11);
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:49:11: ( NUMBER )+
            int cnt16=0;
            try { dbg.enterSubRule(16);

            loop16:
            do {
                int alt16=2;
                try { dbg.enterDecision(16, decisionCanBacktrack[16]);

                int LA16_0 = input.LA(1);

                if ( (LA16_0==NUMBER) ) {
                    alt16=1;
                }


                } finally {dbg.exitDecision(16);}

                switch (alt16) {
            	case 1 :
            	    dbg.enterAlt(1);

            	    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:49:11: NUMBER
            	    {
            	    dbg.location(49,11);
            	    match(input,NUMBER,FOLLOW_NUMBER_in_intConst330); 

            	    }
            	    break;

            	default :
            	    if ( cnt16 >= 1 ) break loop16;
                        EarlyExitException eee =
                            new EarlyExitException(16, input);
                        dbg.recognitionException(eee);

                        throw eee;
                }
                cnt16++;
            } while (true);
            } finally {dbg.exitSubRule(16);}


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        dbg.location(49, 17);

        }
        finally {
            dbg.exitRule(getGrammarFileName(), "intConst");
            decRuleLevel();
            if ( getRuleLevel()==0 ) {dbg.terminate();}
        }

        return ;
    }
    // $ANTLR end "intConst"



    // $ANTLR start "stringConst"
    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:52:1: stringConst : STRING ;
    public final void stringConst() throws RecognitionException {
        try { dbg.enterRule(getGrammarFileName(), "stringConst");
        if ( getRuleLevel()==0 ) {dbg.commence();}
        incRuleLevel();
        dbg.location(52, 0);

        try {
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:53:5: ( STRING )
            dbg.enterAlt(1);

            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:53:8: STRING
            {
            dbg.location(53,8);
            match(input,STRING,FOLLOW_STRING_in_stringConst345); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        dbg.location(54, 4);

        }
        finally {
            dbg.exitRule(getGrammarFileName(), "stringConst");
            decRuleLevel();
            if ( getRuleLevel()==0 ) {dbg.terminate();}
        }

        return ;
    }
    // $ANTLR end "stringConst"



    // $ANTLR start "realConst"
    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:55:1: realConst : ( NUMBER )+ '.' ( NUMBER )* ;
    public final void realConst() throws RecognitionException {
        try { dbg.enterRule(getGrammarFileName(), "realConst");
        if ( getRuleLevel()==0 ) {dbg.commence();}
        incRuleLevel();
        dbg.location(55, 0);

        try {
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:56:5: ( ( NUMBER )+ '.' ( NUMBER )* )
            dbg.enterAlt(1);

            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:56:9: ( NUMBER )+ '.' ( NUMBER )*
            {
            dbg.location(56,9);
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:56:9: ( NUMBER )+
            int cnt17=0;
            try { dbg.enterSubRule(17);

            loop17:
            do {
                int alt17=2;
                try { dbg.enterDecision(17, decisionCanBacktrack[17]);

                int LA17_0 = input.LA(1);

                if ( (LA17_0==NUMBER) ) {
                    alt17=1;
                }


                } finally {dbg.exitDecision(17);}

                switch (alt17) {
            	case 1 :
            	    dbg.enterAlt(1);

            	    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:56:9: NUMBER
            	    {
            	    dbg.location(56,9);
            	    match(input,NUMBER,FOLLOW_NUMBER_in_realConst363); 

            	    }
            	    break;

            	default :
            	    if ( cnt17 >= 1 ) break loop17;
                        EarlyExitException eee =
                            new EarlyExitException(17, input);
                        dbg.recognitionException(eee);

                        throw eee;
                }
                cnt17++;
            } while (true);
            } finally {dbg.exitSubRule(17);}

            dbg.location(56,17);
            match(input,17,FOLLOW_17_in_realConst366); 
            dbg.location(56,21);
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:56:21: ( NUMBER )*
            try { dbg.enterSubRule(18);

            loop18:
            do {
                int alt18=2;
                try { dbg.enterDecision(18, decisionCanBacktrack[18]);

                int LA18_0 = input.LA(1);

                if ( (LA18_0==NUMBER) ) {
                    alt18=1;
                }


                } finally {dbg.exitDecision(18);}

                switch (alt18) {
            	case 1 :
            	    dbg.enterAlt(1);

            	    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:56:21: NUMBER
            	    {
            	    dbg.location(56,21);
            	    match(input,NUMBER,FOLLOW_NUMBER_in_realConst368); 

            	    }
            	    break;

            	default :
            	    break loop18;
                }
            } while (true);
            } finally {dbg.exitSubRule(18);}


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        dbg.location(57, 4);

        }
        finally {
            dbg.exitRule(getGrammarFileName(), "realConst");
            decRuleLevel();
            if ( getRuleLevel()==0 ) {dbg.terminate();}
        }

        return ;
    }
    // $ANTLR end "realConst"



    // $ANTLR start "constant"
    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:60:1: constant : ( stringConst | BOOL | realConst | intConst );
    public final void constant() throws RecognitionException {
        try { dbg.enterRule(getGrammarFileName(), "constant");
        if ( getRuleLevel()==0 ) {dbg.commence();}
        incRuleLevel();
        dbg.location(60, 0);

        try {
            // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:60:9: ( stringConst | BOOL | realConst | intConst )
            int alt19=4;
            try { dbg.enterDecision(19, decisionCanBacktrack[19]);

            try {
                isCyclicDecision = true;
                alt19 = dfa19.predict(input);
            }
            catch (NoViableAltException nvae) {
                dbg.recognitionException(nvae);
                throw nvae;
            }
            } finally {dbg.exitDecision(19);}

            switch (alt19) {
                case 1 :
                    dbg.enterAlt(1);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:60:11: stringConst
                    {
                    dbg.location(60,11);
                    pushFollow(FOLLOW_stringConst_in_constant382);
                    stringConst();

                    state._fsp--;


                    }
                    break;
                case 2 :
                    dbg.enterAlt(2);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:60:24: BOOL
                    {
                    dbg.location(60,24);
                    match(input,BOOL,FOLLOW_BOOL_in_constant385); 

                    }
                    break;
                case 3 :
                    dbg.enterAlt(3);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:60:30: realConst
                    {
                    dbg.location(60,30);
                    pushFollow(FOLLOW_realConst_in_constant388);
                    realConst();

                    state._fsp--;


                    }
                    break;
                case 4 :
                    dbg.enterAlt(4);

                    // /Users/iamapo/Downloads/CI Praktikum 1/MiniPn.g:60:40: intConst
                    {
                    dbg.location(60,40);
                    pushFollow(FOLLOW_intConst_in_constant390);
                    intConst();

                    state._fsp--;


                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }

        finally {
        	// do for sure before leaving
        }
        dbg.location(60, 49);

        }
        finally {
            dbg.exitRule(getGrammarFileName(), "constant");
            decRuleLevel();
            if ( getRuleLevel()==0 ) {dbg.terminate();}
        }

        return ;
    }
    // $ANTLR end "constant"

    // Delegated rules


    protected DFA5 dfa5 = new DFA5(this);
    protected DFA19 dfa19 = new DFA19(this);
    static final String DFA5_eotS =
        "\7\uffff";
    static final String DFA5_eofS =
        "\7\uffff";
    static final String DFA5_minS =
        "\1\4\2\7\1\uffff\1\7\2\uffff";
    static final String DFA5_maxS =
        "\1\17\2\41\1\uffff\1\41\2\uffff";
    static final String DFA5_acceptS =
        "\3\uffff\1\1\1\uffff\1\3\1\2";
    static final String DFA5_specialS =
        "\7\uffff}>";
    static final String[] DFA5_transitionS = {
            "\1\5\2\uffff\1\2\1\uffff\1\1\2\uffff\1\3\2\uffff\1\4",
            "\2\3\1\1\1\uffff\1\3\1\uffff\1\5\3\uffff\1\5\3\uffff\4\3\1"+
            "\uffff\2\3\1\uffff\1\3\3\uffff\1\3",
            "\2\3\2\uffff\1\3\1\uffff\1\5\7\uffff\4\3\1\uffff\2\3\1\uffff"+
            "\1\3\3\uffff\1\3",
            "",
            "\1\6\5\uffff\1\5\7\uffff\4\6\1\uffff\2\6\1\uffff\1\6\3\uffff"+
            "\1\6",
            "",
            ""
    };

    static final short[] DFA5_eot = DFA.unpackEncodedString(DFA5_eotS);
    static final short[] DFA5_eof = DFA.unpackEncodedString(DFA5_eofS);
    static final char[] DFA5_min = DFA.unpackEncodedStringToUnsignedChars(DFA5_minS);
    static final char[] DFA5_max = DFA.unpackEncodedStringToUnsignedChars(DFA5_maxS);
    static final short[] DFA5_accept = DFA.unpackEncodedString(DFA5_acceptS);
    static final short[] DFA5_special = DFA.unpackEncodedString(DFA5_specialS);
    static final short[][] DFA5_transition;

    static {
        int numStates = DFA5_transitionS.length;
        DFA5_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA5_transition[i] = DFA.unpackEncodedString(DFA5_transitionS[i]);
        }
    }

    class DFA5 extends DFA {

        public DFA5(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 5;
            this.eot = DFA5_eot;
            this.eof = DFA5_eof;
            this.min = DFA5_min;
            this.max = DFA5_max;
            this.accept = DFA5_accept;
            this.special = DFA5_special;
            this.transition = DFA5_transition;
        }
        public String getDescription() {
            return "16:28: ( arithExpr | stringConst | comparison )";
        }
        public void error(NoViableAltException nvae) {
            dbg.recognitionException(nvae);
        }
    }
    static final String DFA19_eotS =
        "\6\uffff";
    static final String DFA19_eofS =
        "\6\uffff";
    static final String DFA19_minS =
        "\1\4\2\uffff\1\7\2\uffff";
    static final String DFA19_maxS =
        "\1\17\2\uffff\1\41\2\uffff";
    static final String DFA19_acceptS =
        "\1\uffff\1\1\1\2\1\uffff\1\3\1\4";
    static final String DFA19_specialS =
        "\6\uffff}>";
    static final String[] DFA19_transitionS = {
            "\1\2\4\uffff\1\3\5\uffff\1\1",
            "",
            "",
            "\1\5\1\uffff\1\3\3\uffff\1\5\3\uffff\1\4\2\uffff\5\5\1\uffff"+
            "\2\5\1\uffff\1\5\2\uffff\2\5",
            "",
            ""
    };

    static final short[] DFA19_eot = DFA.unpackEncodedString(DFA19_eotS);
    static final short[] DFA19_eof = DFA.unpackEncodedString(DFA19_eofS);
    static final char[] DFA19_min = DFA.unpackEncodedStringToUnsignedChars(DFA19_minS);
    static final char[] DFA19_max = DFA.unpackEncodedStringToUnsignedChars(DFA19_maxS);
    static final short[] DFA19_accept = DFA.unpackEncodedString(DFA19_acceptS);
    static final short[] DFA19_special = DFA.unpackEncodedString(DFA19_specialS);
    static final short[][] DFA19_transition;

    static {
        int numStates = DFA19_transitionS.length;
        DFA19_transition = new short[numStates][];
        for (int i=0; i<numStates; i++) {
            DFA19_transition[i] = DFA.unpackEncodedString(DFA19_transitionS[i]);
        }
    }

    class DFA19 extends DFA {

        public DFA19(BaseRecognizer recognizer) {
            this.recognizer = recognizer;
            this.decisionNumber = 19;
            this.eot = DFA19_eot;
            this.eof = DFA19_eof;
            this.min = DFA19_min;
            this.max = DFA19_max;
            this.accept = DFA19_accept;
            this.special = DFA19_special;
            this.transition = DFA19_transition;
        }
        public String getDescription() {
            return "60:1: constant : ( stringConst | BOOL | realConst | intConst );";
        }
        public void error(NoViableAltException nvae) {
            dbg.recognitionException(nvae);
        }
    }
 

    public static final BitSet FOLLOW_28_in_prog12 = new BitSet(new long[]{0x00000000C20C0000L});
    public static final BitSet FOLLOW_declaration_in_prog14 = new BitSet(new long[]{0x00000000C20C0000L});
    public static final BitSet FOLLOW_18_in_prog17 = new BitSet(new long[]{0x0000000229400080L});
    public static final BitSet FOLLOW_statement_in_prog19 = new BitSet(new long[]{0x0000000229400080L});
    public static final BitSet FOLLOW_22_in_prog22 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_set_in_declaration30 = new BitSet(new long[]{0x0000000000000080L});
    public static final BitSet FOLLOW_ID_in_declaration40 = new BitSet(new long[]{0x0000000000014000L});
    public static final BitSet FOLLOW_16_in_declaration42 = new BitSet(new long[]{0x0000000000000080L});
    public static final BitSet FOLLOW_ID_in_declaration43 = new BitSet(new long[]{0x0000000000014000L});
    public static final BitSet FOLLOW_SEMI_in_declaration47 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_assignment_in_statement54 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ifStat_in_statement60 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_whileStat_in_statement73 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_readStat_in_statement80 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_printStat_in_statement86 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_assignment97 = new BitSet(new long[]{0x0000000000000040L});
    public static final BitSet FOLLOW_DECLARATION_in_assignment99 = new BitSet(new long[]{0x0000000000009290L});
    public static final BitSet FOLLOW_arithExpr_in_assignment102 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_stringConst_in_assignment104 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_comparison_in_assignment106 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_pointExpr_in_arithExpr115 = new BitSet(new long[]{0x0000000000000102L});
    public static final BitSet FOLLOW_LINEOP_in_arithExpr118 = new BitSet(new long[]{0x0000000000001280L});
    public static final BitSet FOLLOW_pointExpr_in_arithExpr120 = new BitSet(new long[]{0x0000000000000102L});
    public static final BitSet FOLLOW_atom_in_pointExpr132 = new BitSet(new long[]{0x0000000000000802L});
    public static final BitSet FOLLOW_POINTOP_in_pointExpr135 = new BitSet(new long[]{0x0000000000001280L});
    public static final BitSet FOLLOW_atom_in_pointExpr137 = new BitSet(new long[]{0x0000000000000802L});
    public static final BitSet FOLLOW_intConst_in_atom148 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_atom153 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_POPEN_in_atom161 = new BitSet(new long[]{0x0000000000001280L});
    public static final BitSet FOLLOW_arithExpr_in_atom163 = new BitSet(new long[]{0x0000000000000400L});
    public static final BitSet FOLLOW_PCLOSED_in_atom165 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ID_in_comparison179 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_constant_in_comparison181 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_RELOP_in_comparison184 = new BitSet(new long[]{0x0000000000008290L});
    public static final BitSet FOLLOW_ID_in_comparison187 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_constant_in_comparison189 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_24_in_ifStat199 = new BitSet(new long[]{0x0000000000008290L});
    public static final BitSet FOLLOW_comparison_in_ifStat201 = new BitSet(new long[]{0x0000000100000000L});
    public static final BitSet FOLLOW_32_in_ifStat203 = new BitSet(new long[]{0x0000000229000080L});
    public static final BitSet FOLLOW_statement_in_ifStat205 = new BitSet(new long[]{0x0000000229A00080L});
    public static final BitSet FOLLOW_21_in_ifStat209 = new BitSet(new long[]{0x0000000229000080L});
    public static final BitSet FOLLOW_statement_in_ifStat211 = new BitSet(new long[]{0x0000000229800080L});
    public static final BitSet FOLLOW_23_in_ifStat216 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_33_in_whileStat223 = new BitSet(new long[]{0x0000000000008290L});
    public static final BitSet FOLLOW_comparison_in_whileStat225 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_20_in_whileStat227 = new BitSet(new long[]{0x000000022D000080L});
    public static final BitSet FOLLOW_statement_in_whileStat229 = new BitSet(new long[]{0x000000022D000080L});
    public static final BitSet FOLLOW_26_in_whileStat232 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_29_in_readStat240 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_POPEN_in_readStat243 = new BitSet(new long[]{0x0000000000000080L});
    public static final BitSet FOLLOW_ID_in_readStat245 = new BitSet(new long[]{0x0000000000000400L});
    public static final BitSet FOLLOW_PCLOSED_in_readStat247 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_27_in_printStat255 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_POPEN_in_printStat257 = new BitSet(new long[]{0x0000000000008080L});
    public static final BitSet FOLLOW_ID_in_printStat260 = new BitSet(new long[]{0x0000000000000400L});
    public static final BitSet FOLLOW_stringConst_in_printStat262 = new BitSet(new long[]{0x0000000000000400L});
    public static final BitSet FOLLOW_PCLOSED_in_printStat265 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NUMBER_in_intConst330 = new BitSet(new long[]{0x0000000000000202L});
    public static final BitSet FOLLOW_STRING_in_stringConst345 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NUMBER_in_realConst363 = new BitSet(new long[]{0x0000000000020200L});
    public static final BitSet FOLLOW_17_in_realConst366 = new BitSet(new long[]{0x0000000000000202L});
    public static final BitSet FOLLOW_NUMBER_in_realConst368 = new BitSet(new long[]{0x0000000000000202L});
    public static final BitSet FOLLOW_stringConst_in_constant382 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_BOOL_in_constant385 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_realConst_in_constant388 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_intConst_in_constant390 = new BitSet(new long[]{0x0000000000000002L});

}